package com.base.commonlib.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 现场检查项实体
 * Created by weikailiang on 2019/11/14.
 */
@Entity
public class CheckRecordEntity implements Parcelable {
    @org.greenrobot.greendao.annotation.Id
    private Long _Id;
    private String id;
    private String localId;//本地关联ID
    private String login_user_id;//当前登录人ID

    private String lawId; //


    private String legislationId; // 检查事项id

    private Integer isMajor; // 是否重大隐患：0否1是

    private Integer isQualified=1; // 是否合格：0否1是

    private String lawName;//检查项
    private String legislationName;//检查内容

    public Integer isNowChange;//是否立即整改 0 限期整改 1 立即整改





    protected CheckRecordEntity(Parcel in) {
        localId = in.readString();
        login_user_id = in.readString();
        lawId = in.readString();
        legislationId = in.readString();
        isMajor = in.readInt();
        isQualified = in.readInt();
        lawName = in.readString();
        legislationName = in.readString();
        isNowChange = in.readInt();
        id = in.readString();
    }

    @Generated(hash = 1543584329)
    public CheckRecordEntity(Long _Id, String id, String localId, String login_user_id, String lawId,
            String legislationId, Integer isMajor, Integer isQualified, String lawName,
            String legislationName, Integer isNowChange) {
        this._Id = _Id;
        this.id = id;
        this.localId = localId;
        this.login_user_id = login_user_id;
        this.lawId = lawId;
        this.legislationId = legislationId;
        this.isMajor = isMajor;
        this.isQualified = isQualified;
        this.lawName = lawName;
        this.legislationName = legislationName;
        this.isNowChange = isNowChange;
    }

    @Generated(hash = 689860008)
    public CheckRecordEntity() {
    }


    public static final Creator<CheckRecordEntity> CREATOR = new Creator<CheckRecordEntity>() {
        @Override
        public CheckRecordEntity createFromParcel(Parcel in) {
            return new CheckRecordEntity(in);
        }

        @Override
        public CheckRecordEntity[] newArray(int size) {
            return new CheckRecordEntity[size];
        }
    };

    public Integer getIsNowChange() {
        return isNowChange;
    }

    public void setIsNowChange(Integer isNowChange) {
        this.isNowChange = isNowChange;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLawName() {
        return lawName;
    }

    public void setLawName(String lawName) {
        this.lawName = lawName;
    }

    public String getLegislationName() {
        return legislationName;
    }

    public void setLegislationName(String legislationName) {
        this.legislationName = legislationName;
    }

    public String getLocalId() {
        return localId;
    }

    public void setLocalId(String localId) {
        this.localId = localId;
    }

    public String getLogin_user_id() {
        return login_user_id;
    }

    public void setLogin_user_id(String login_user_id) {
        this.login_user_id = login_user_id;
    }

    public String getLawId() {
        return lawId;
    }

    public void setLawId(String lawId) {
        this.lawId = lawId;
    }

    public String getLegislationId() {
        return legislationId;
    }

    public void setLegislationId(String legislationId) {
        this.legislationId = legislationId;
    }

    public Integer getIsMajor() {
        return isMajor;
    }

    public void setIsMajor(Integer isMajor) {
        this.isMajor = isMajor;
    }

    public Integer getIsQualified() {
        return isQualified;
    }

    public void setIsQualified(Integer isQualified) {
        this.isQualified = isQualified;
    }



    public Long get_Id() {
        return this._Id;
    }

    public void set_Id(Long _Id) {
        this._Id = _Id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(localId);
        parcel.writeString(login_user_id);
        parcel.writeString(lawId);
        parcel.writeString(legislationId);
        if (isMajor==null){
            parcel.writeInt(0);
        }else {
            parcel.writeInt(isMajor);
        }
        if (isQualified==null){
            parcel.writeInt(1);
        }else {
            parcel.writeInt(isQualified);
        }
        parcel.writeString(lawName);
        parcel.writeString(legislationName);
        if (isNowChange==null){
            parcel.writeInt(0);
        }else {
            parcel.writeInt(isNowChange);
        }
        parcel.writeString(id);
    }
}
